#!/bin/bash

# 创建文件夹
mkdir -p ~/workspace/virtual-machines/vagrant/centos-7
cd ~/workspace/virtual-machines/vagrant/centos-7

# 复制vagrant file
cp ~/workspace/tool/mac-backup/vagrant/Vagrantfile ~/workspace/virtual-machines/vagrant/centos-7/
echo '=================================== Vagrant file ready ==================================='

cd ~/workspace/virtual-machines/vagrant/centos-7/

# 创建虚拟机
vagrant up

# 查看虚拟机状态
vagrant status

# 停止虚拟机
vagrant halt

echo '=================================== Vagrant up success! ==================================='
